
<template>
<div style="width: 600px; height: 360px">
    <iframe :src='src' style="width: 100%; height: 100%">
    </iframe>
    <button @click="getData">发送请求</button>
</div>
</template>

<script>

import Axios from 'axios'

export default {
  data () {
    return {
      list: [],
      showSessionId: '',
      src: ''
    }
  },
  mounted () {
    this.showSessionId = window.location.search
    this.src = `static/slider.html${this.showSessionId}`
  },

  methods: {
    getData () {
      // 请求数据
      // var api = 'http://www.phonegap100.com/appapi.php?a=getPortalList&catid=20&page=1'
      var api = ''
      let param = {'type': 0, 'image1': 'image/1.jpg', 'image2': 'image/2.jpg'}
      Axios.post(api, param).then((response) => {
        console.log(response)
        this.list = response.data.result
      }).catch((error) => {
        console.log(error)
      })
    }
  }
}

</script>
